//
// Created by Administrator on 2025/8/22.
//

#ifndef CTEST_TEST9_H
#define CTEST_TEST9_H


#include <iostream>
#include <vector>

class Test9C1 {

private:
    int age;
    const char *chr;
    mutable int count;
public:

    Test9C1(int age, const char *c) : age(age), chr(c) {};

    ~Test9C1() {
    };

    Test9C1(const Test9C1 &target) {
        this->age = 1;
        this->chr = "???";
    }

    void foo1();

    friend void friendVisitor(Test9C1 &c);

    void foo3();

    static void foo4(Test9C1 &c);

    virtual void foo5();

    virtual void foo6() = 0;

    void foo7() const;

protected:
    void foo2();
};

class Test9C2 : public Test9C1 {

public:
    Test9C2() : Test9C1(1, "dawd") {};

    void foo5() override;

    friend std::ostream &operator<<(std::ostream &o,
                                    Test9C2 &a) {
        o << "??";
        return o;
    }

    void foo6() override;
};

class Test9C3AbstractClass {


public:

    virtual void foo1() = 0;

    virtual void foo2() = 0;

    virtual void foo3() = 0;

    virtual void foo4() = 0;
};

class Test9C3AbstractClassImpl : public Test9C3AbstractClass {
public:
    void foo1() override;

    void foo2() override;

    void foo3() override;

    void foo4() override;

};

constexpr int test9Foo1(int c);


template<typename A>
concept T9T1 = requires(A a, A b){
    a > b < a;
};

template<typename A>
requires T9T1<A>
void test9Foo2(A &&a, A &b) {
}

template<typename V>
concept IS_PRINT = requires(V v) {
    std::cout << v;
};

template<typename V>
requires IS_PRINT<V>
void print(V &v) {
    std::cout << v << std::endl;
}


void test9Foo5(std::vector<int> &c);


#endif //CTEST_TEST9_H
